﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PartyVolunteerActivityEdit.aspx.cs" Inherits="ZHDJ.BranchCenter.Module.PartyVolunteer.PartyVolunteerActivityEdit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../Resource/ueditor/ueditor.config.js"></script>
    <script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>
</head>
<body>
    <form id="form1" runat="server" style="background-color: #0000FF" onsubmit="return UESync();">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server" Layout="Table" BoxConfigAlign="Stretch">
            <Items>
                <f:SimpleForm ID="SimpleForm1" ShowBorder="false" ShowHeader="false" runat="server"
                    BodyPadding="10px" Title="SimpleForm">
                    <Items>
                        <f:TextBox ID="txtTitle" Required="true" ShowRedStar="true" Label="活动主题" runat="server" LabelAlign="Right" LabelWidth="100px">
                        </f:TextBox>
                        <f:DropDownList ID="ddlCategory" runat="server" Label="活动类型" LabelAlign="Right" LabelWidth="100px">
                            <f:ListItem Text="在职党员进社区" Value="0" />
                            <f:ListItem Text="党员社区服务日" Value="1" />
                            <f:ListItem Text="党组织义务服务" Value="2" />
                        </f:DropDownList>
                        <f:DropDownList ID="ddlThematic" runat="server" Label="所属专题" LabelAlign="Right" LabelWidth="100px">
                        </f:DropDownList>
                        <f:DatePicker ID="dpBeginTime" runat="server" Label="活动开始时间" LabelAlign="Right" LabelWidth="100px" Required="true" ShowRedStar="true"></f:DatePicker>
                        <f:DatePicker ID="dpEndTime" runat="server" Label="活动结束时间" LabelAlign="Right" LabelWidth="100px" Required="true" ShowRedStar="true"></f:DatePicker>
                        <f:TextBox ID="txtAddress" runat="server" Label="活动地址" LabelAlign="Right" LabelWidth="100px" ShowRedStar="true" Required="true"></f:TextBox>
                        <f:FileUpload runat="server" EmptyText="请选择文件" ID="fileupload"
                            Label="附件" LabelWidth="100px" ButtonText="上传" ButtonIcon="Add"
                            AutoPostBack="true" LabelAlign="Right" OnFileSelected="fileupload_FileSelected">
                        </f:FileUpload>
                        <f:HiddenField ID="hdFileID" runat="server"></f:HiddenField>
                        <f:DropDownList ID="ddlIsShowHome" runat="server" Label="召集范围" LabelAlign="right" LabelWidth="100px">
                            <f:ListItem Text="本组织（发布到本组织主页）" Value="0" />
                            <f:ListItem Text="所有组织（发布到本组织主页）和网站首页" Value="1" />
                        </f:DropDownList>
                        <f:TextBox ID="txtCreateBy" runat="server" Label="发布人" LabelAlign="right" Enabled="false" LabelWidth="100px"></f:TextBox>
                        <f:TextBox ID="txtBranch" runat="server" Label="所属组织" LabelAlign="right" LabelWidth="100px" Enabled="false"></f:TextBox>
                        <f:TriggerBoxPicker runat="server" ID="ppMember" Label="参与人员" LabelWidth="100px" LabelAlign="Right"
                            WindinsTitle="选择参与人员" WindinsHeight="450px" WindinsWidth="700px" ShowTrigger1="false" ShowEmptyLabel="true" EnableEdit="false"
                            EmptyText="请选择参与人员" WindinsUrl="../../../Share/Picker/MemberMultiplePicker.aspx" Trigger1Icon="Clear" Required="true" ShowRedStar="true">
                        </f:TriggerBoxPicker>
                        <f:Label ID="lbContent" runat="server" LabelAlign="right" Label="召集通知" LabelWidth="100px"></f:Label>
                        <f:ContentPanel ID="ContentPanel1" runat="server" ShowBorder="false" ShowHeader="false">
                            <script type="text/plain" id="editor"></script>
                        </f:ContentPanel>
                    </Items>
                </f:SimpleForm>
            </Items>
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="SimpleForm1" Icon="SystemSaveClose"
                            OnClick="btnSaveClose_Click" runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnPublish" ValidateForms="SimpleForm1" Icon="Transmit"
                            OnClick="btnPublish_Click" runat="server" Text="创建活动">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭" DisableControlBeforePostBack="True">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>
    </form>
</body>
</html>
<script>
    var editorContent = '<%=EditorContent%>';

    var ue = UE.getEditor("editor", {
        initialFrameWidth: '100%',
        initialFrameHeight: '400px',
        enableAutoSave: false,
        saveInterval: 1000000,
        elementPathEnabled: false,
        autoHeightEnabled: false
    });

    ue.ready(function () {
        if (editorContent) {
            ue.setContent(editorContent);
        }
    });

    function UESync() {
        var editor = UE.getEditor('editor')
        editor.sync();
        return true;
    }
</script>
